//
//  MenuFenleiModel.m
//  Products_B
//
//  Created by lanou on 16/5/29.
//  Copyright © 2016年 朋学友. All rights reserved.
//

#import "MenuFenleiModel.h"

@implementation MenuFenleiModel
+ (NSMutableArray *)modelSectionTitleConFigureWithDic:(NSDictionary *)jsonDic{
    NSMutableArray *titleArray = [NSMutableArray array];
    NSArray *dataArray = jsonDic[@"data"][@"data"];
    for (NSDictionary *dataDic in dataArray) {
        [titleArray addObject:dataDic[@"text"]];
    
    }
    return titleArray;
}
+ (NSMutableArray *)modelPicArrayConfigureWithDic:(NSDictionary *)jsonDic{
    NSMutableArray *picArray = [NSMutableArray array];
    NSArray *dataArray = jsonDic[@"data"][@"data"];
    for (NSDictionary *dataDic in dataArray) {
        [picArray addObject:dataDic[@"image"]];
        
    }
    return picArray;
}
+ (NSMutableDictionary *)modelModelDataConfiggureWithDic:(NSDictionary *)jsonDic{
    NSMutableDictionary *BigDataDic = [NSMutableDictionary dictionary];
      NSArray *dataArray = jsonDic[@"data"][@"data"];
    for (NSDictionary *dataDic in dataArray) {
        NSMutableArray *modelArray = [NSMutableArray array];
        NSString *key = dataDic[@"text"];
    
        NSArray *array = dataDic[@"data"];
        for (NSDictionary *dataeDic in array) {
            MenuFenleiModel *model = [[self alloc]init];
            [model setValuesForKeysWithDictionary:dataeDic];
            [modelArray addObject:model];
        }
        [BigDataDic setObject:modelArray forKey:key];
    }
    return BigDataDic;
}

@end
